package com.sapethemape.json
{
	import com.adobe.serialization.json.JSON;
	
	import flash.filesystem.*;
	
	public class DummyJSON
	{
		public var JSONstring:String = "";
		public var JSONobject:Object;
		
		public function DummyJSON()
		{
			var urlStr:String = "file:///c:/json.txt"; //"file:///C:/json.txt";
			var file:File = new File();
			file.url = urlStr;
			var fs:FileStream = new FileStream();
			fs.open(file,FileMode.READ);
			JSONstring = fs.readUTFBytes(file.size);
			fs.close();
			
			try{
				JSONobject = (JSON.decode(JSONstring) as Object);
			}catch(e:Error)
			{
				trace('JSON ERROR:',e.message);	
			} 	
		}
	}
}